package com.huadi.service.impl;

import com.huadi.dao.ViolationDao;
import com.huadi.domain.Violation;
import com.huadi.service.ViolationService;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ViolationServiceImpl implements ViolationService {

    @Resource
    private ViolationDao violationDao;

    @Override
    public int addViolation(Violation violation) {
        int num2 = violationDao.insertViolation(violation);
        return num2;
    }

    @Override
    public List<Violation> findViolations() {

        return violationDao.selectViolations();
    }
}
